<template>
	<view class="content">
		<frist-nav></frist-nav>
		<video-list class="videoList" :list="list"></video-list>
		<tab></tab>
	</view>
</template>

<script>
	import videoList from "../../commponents/videoList.vue"
	import fristNav from "../../commponents/frist-nav.vue"
	import tab from "../../commponents/tab/tab"
	export default {
		data() {
			return {
				title: 'Hello',
				list:[]
			}
		},
		components: {
			tab,
			fristNav,
			videoList
		},
		onLoad() {
			this.getVideos()
		},
		methods: {
			getVideos(){
				uni.request({
					url:'http://localhost:8080/api/videos.json',
					success:res=>{
						console.log(res) 
						this.list = res.data.list
					}
				})
			}
		}
	}
</script>

<style>
	.videoList {
		height: 100%;
		width: 100%;
	}

	.content {
		height: 100%;
		width: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
